package com.huike.pmps.controller;

import com.huike.pmps.model.dto.common.PageInfo;
import com.huike.pmps.model.vo.Result;
import com.huike.pmps.service.PersonnelCostService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 作者：谌贵斌(黑桃K)
 * 日期: 2888-08-08
 * 老师QQ: 272488352
 * 官方QQ交流群: 377748272
 * 刀客程序员官网：http://www.daoke360.com
 * 刀客程序员淘宝旗舰店：https://daoke360.taobao.com/
 */
@RestController
@RequestMapping("/api/personnelCosts")
@Api(tags = "驾驶舱-基础数据-人员成本数据")
public class PersonnelCostController {

    @Autowired
    private PersonnelCostService personnelCostService;

    @ApiOperation(value = "按搜索条件分页查询", httpMethod = "GET")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "regionId", value = "战区ID", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "provinceId", value = "省区ID", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "courseChargeName", value = "课程顾问", paramType = "query", dataType = "String"),
            @ApiImplicitParam(name = "year", value = "年(2019...2020)", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "month", value = "月(1/2/3/4/5/../10/11/12)", paramType = "query", dataType = "int"),

    })
    @GetMapping
    public Result selectByCondition(PageInfo pageInfo, Integer regionId, Integer provinceId, String courseChargeName, Integer year, Integer month) {
        return personnelCostService.selectByCondition(pageInfo, regionId, provinceId, courseChargeName, year, month);
    }

}
